﻿using DFGK_WMS.Model.Models;

namespace DFGK_WMS.IRepository
{
    public interface ITShippingLockCellRepository : IBaseRepository<TShippingLockCell>
    {
        /// <summary>
        /// 出库分配库位 策略
        /// </summary>
        /// <param name="warehouseCode">库房编码</param>
        /// <param name="areaCode">库区编码</param>
        /// <param name="materialId">物料id</param>
        /// <param name="batchNO">批次号</param>
        /// <param name="qualityState">质量状态</param>
        /// <param name="expectedQTY">预计出库数量</param>
        /// <param name="ownerId">货主id</param>
        /// <param name="lockCellList">out 分配到的仓位</param>
        /// <param name="errorMsg">错误信息</param>
        /// <param name="orderDetailId">出库单详细Id</param>
        /// <param name="supplierId">供应商id</param>
        /// <param name="produceFactory">生产厂家</param>
        /// <returns></returns>
        bool LockCell(string materialCode, decimal expectedQTY, out List<TShippingLockCell> lockCellList, out string errorMsg, int? ownerId = null, string? BatchNo = null, int? supplierId = null);

        /// <summary>
        /// 获取可出库数量
        /// </summary>
        /// <param name="materialCode"></param>
        /// <param name="errorMsg"></param>
        /// <param name="totalTInventoryCount"></param>
        /// <param name="invCount"></param>
        /// <returns></returns>
        decimal GetKeChuInvCount(string materialCode);
        /// <summary>
        /// 获取库存数量
        /// </summary>
        /// <param name="materialCode"></param>
        /// <returns></returns>
        decimal GetInvCount(string materialCode);
    }
}
